* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #1a1a2e;
    color: #fff;
    overflow: hidden;
}

.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    overflow: hidden;
}

.cell-boundary {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.02); opacity: 0.6; }
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    background: transparent;
    cursor: pointer;
}

.ui-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    min-width: 250px;
}

.status-bar {
    margin-bottom: 10px;
}

.status-label {
    display: inline-block;
    width: 80px;
    font-size: 12px;
}

.energy-bar, .volume-bar {
    display: inline-block;
    width: 120px;
    height: 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 7px;
    overflow: hidden;
    vertical-align: middle;
}

.energy-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ffa500);
    transition: width 0.3s;
}

.volume-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4, #44a08d);
    transition: width 0.3s;
}

.stats {
    font-size: 12px;
    margin-bottom: 5px;
}

.instructions {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    max-width: 400px;
}

.particle-info {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    max-width: 250px;
    display: block;
}

.reaction-list {
    position: absolute;
    top: 200px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 10px;
    max-width: 280px;
    font-size: 12px;
}

.reaction-list h4 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 5px;
}

.reaction-item {
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    border-left: 3px solid #4ecdc4;
}

.reaction-name {
    font-weight: bold;
    color: #4ecdc4;
    margin-bottom: 3px;
}

.reaction-formula {
    font-family: 'Courier New', monospace;
    color: #ffa500;
    margin-bottom: 2px;
    font-size: 11px;
}

.reaction-desc {
    color: #ddd;
    font-size: 10px;
}

.reaction-tip {
    margin-top: 10px;
    padding: 8px;
    background: rgba(255, 193, 7, 0.2);
    border-radius: 5px;
    text-align: center;
    font-size: 11px;
    color: #ffa500;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.particle-type {
    margin-bottom: 8px;
    padding: 5px;
    border-radius: 5px;
    font-size: 12px;
}

.rna { background: rgba(0, 123, 255, 0.3); border-left: 3px solid #007bff; }
.amino { background: rgba(40, 167, 69, 0.3); border-left: 3px solid #28a745; }
.energy { background: rgba(255, 193, 7, 0.3); border-left: 3px solid #ffc107; }
.lipid { background: rgba(108, 117, 125, 0.3); border-left: 3px solid #6c757d; }
.enzyme { background: rgba(220, 53, 69, 0.3); border-left: 3px solid #dc3545; }
.intermediate { background: rgba(139, 69, 193, 0.3); border-left: 3px solid #8b45c3; }

.reaction-hint {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
    z-index: 1000;
    pointer-events: none;
}

.reaction-progress {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(40, 167, 69, 0.9);
    padding: 20px;
    border-radius: 15px;
    display: none;
    z-index: 1000;
}

.dragging {
    cursor: grabbing !important;
    z-index: 1000;
}

.game-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 24px;
    z-index: -1;
    pointer-events: none;
}
